// pages/home_personage/index/index.js
const $app = getApp()
Component({
  properties: {},
  data: {
    userInfo: $app.userInfo || {},
    baseUrl: $app.baseUrl || null,
    iconData: $app.iconData || {},
    data: [
      { title: '修改密码', icon: 'changePassword', path: '/pages/home_personage/person_changePassword/person_changePassword'},
      { title: '常见问题', icon: 'problem', path: '/pages/home_personage/person_problem/person_problem' }
    ]
  },
  lifetimes: { // 组件生命周期
    attached () { // 组件生命周期: 在组件实例进入页面节点树时执行
      this.setData({ userInfo: $app.userInfo })
    }
  },
  methods: {
    // ========== 跳页 ==========
    goPage (e) {
      const b = e.currentTarget.dataset.item
      wx.navigateTo({ url: b.path })
    },
    // ========== 退出登录 ==========
    logOff () {
      wx.reLaunch({ url: '/pages/login/login' })
    }
  }
})